{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "eaba6150",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "print(\"hello world\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4b9fd17e",
   "metadata": {},
   "source": [
    "---\n",
    "* 时间2022-08-29\n",
    "* Python学习第二周\n",
    "* 学习记录人：小紫\n",
    "* 本周学习内容\n",
    "---"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b9f35145",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "894144\n",
      "This minute seems a little odd.\n",
      "895240\n"
     ]
    }
   ],
   "source": [
    "import datetime\n",
    "\n",
    "print(datetime.datetime.today().microsecond)\n",
    "\n",
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19,\n",
    "             21,23,25,27,29,31,33,35,37,39,\n",
    "             41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.datetime.today().minute\n",
    "\n",
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")\n",
    "\n",
    "print(datetime.datetime.today().microsecond)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "be377316",
   "metadata": {},
   "source": [
    "# 2.1模块--标准库\n",
    "* 标准库是Python开发团队为满足Python用户日常需求而写好的一些模块，可以直接使用：import模块名称\n",
    "\n",
    "> 1. sys模块\n",
    "\n",
    "> 2. os模块\n",
    "\n",
    "> 3. datetime模块"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ac02f3c3",
   "metadata": {},
   "source": [
    "# 2.2模块--开源模块（pypi.org）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4cbbb15d",
   "metadata": {},
   "source": [
    "# 2.3自定义模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "7bcf5cec",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "4b7b03f8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]\n"
     ]
    }
   ],
   "source": [
    "print(sys.version)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "c5029787",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "851c760b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'C:\\\\Users\\\\zoulr'"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "81a4e23e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "adf23155",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=9, tm_mday=25, tm_hour=10, tm_min=18, tm_sec=37, tm_wday=6, tm_yday=268, tm_isdst=0)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "fc69d27a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1664072338.9858136"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.time()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "5692e0c2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "52.76738844764212"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.time()/60/60/24/365"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "72bbe1bc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1970"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "2022-52"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "edc1369b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=9, tm_mday=25, tm_hour=2, tm_min=19, tm_sec=43, tm_wday=6, tm_yday=268, tm_isdst=0)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.gmtime()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dade4b82",
   "metadata": {},
   "source": [
    "# 3.赋值"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "69d3d064",
   "metadata": {},
   "source": [
    "# 4.变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4747a181",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
